Skip to content

Parser: allow expressions in annotations - #1370

Merged
eponier merged 2 commits into
mainfrom
expr-in-assert
Jan 22, 2026
Merged

Parser: allow expressions in annotations#1370
eponier merged 2 commits into
mainfrom
expr-in-assert

Conversation

@vbgl

@vbgl vbgl commented Jan 21, 2026

Copy link
Copy Markdown
Member

This change has been extracted from #1170.

@eponier

eponier commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

If I understand correctly, this duplicates type annotations. Is it on purpose that the old one is not removed?

@vbgl

vbgl commented Jan 21, 2026

Copy link
Copy Markdown
Member Author

It’s not a duplicate. There are pannotations with arbitrary pexpr that only occur in concrete syntax. The old annotations datatype only has restricted expressions: int constants and identifiers.

@eponier

eponier commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Indeed, thanks for the explanation.

@eponier
eponier merged commit ab6fa6c into main Jan 22, 2026
1 check passed
@eponier
eponier deleted the expr-in-assert branch January 22, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants